home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 55 / 055.d81 / roll off (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  13KB  |  404 lines

  1. 10 zz=zz+1:poke53272,21:print""
  2. 20 ifzz=1thenpoke53280,0:poke53281,0:goto2180
  3. 30 ifzz=2thenload"ro1",8,1
  4. 40 ifzz=3thenload"ro2",8,1
  5. 45 ifzz=4thenload"fanfare",8,1
  6. 50 gosub2340:forx=1to500:next
  7. 60 pokesp+21,0:gosub2140
  8. 70 print"[147][159]              =   ";
  9. 80 print"[146]                =   [146]"
  10. 90 print"  [159]          ";
  11. 100 print"  =   [146]                =   [146]       ";
  12. 110 print"                         ";
  13. 120 print"  [146]                       ";
  14. 130 print"                         ";
  15. 140 print" [159]           [180]  [180]  [180]  [180]  [180]";
  16. 150 print"  [180]  [180]  [180]  [180]    [159]         ";
  17. 160 print"  [180]  [180]  [180]  [180]  [180]  [180]  [180]  [180] ";
  18. 170 print" [180]    [159]           [180]1 [180]2 [180]3";
  19. 180 print" [180]4 [180]5 [180]6 [180]7 [180]8 [180]9   [159]    ";
  20. 190 print"       [180]  [180]  [180]  [180]  [180]  [180]  ";
  21. 200 print"[180]  [180]  [180]    [159]           [180]  ";
  22. 210 print"[180]  [180]  [180]  [180]  [180]  [180]  [180]  [180]   ";
  23. 220 print" [159]           [180]  [180]  [180]  [180]  [180]";
  24. 230 print"  [180]  [180]  [180]  [180]             ";
  25. 240 print"                         ";
  26. 250 print"                         ";
  27. 260 print"                         ";
  28. 270 print"                         ";
  29. 280 print"                         ";
  30. 290 print"                         ";
  31. 300 print"                         ";
  32. 310 print"                         ";
  33. 320 print"                         ";
  34. 330 print"                         ";
  35. 340 print"                         ";
  36. 350 print"                         ";
  37. 360 print"                         ";
  38. 370 print"                         ";
  39. 380 print"                         ";
  40. 390 print"                         ";
  41. 400 print"                         ";
  42. 410 print"                         ";
  43. 420 print"                   [146][144]"
  44. 430 poke1983,160:poke54272+1983,6
  45. 440 ed$=""
  46. 450 sb=1313:sc=54272:ty%=4:ln%=1
  47. 460 printed$"number of players   [157][157][157] ";:gosub2850:np$=k$
  48. 470 ifk$>"0"andk$<"5"then510
  49. 480 printed$"      choose a number from 1 to 4!"
  50. 490 fora=1to2000:next
  51. 500 printed$"                                     ":goto460
  52. 510 gz$="        [157][157][157][157][157][157][157][157]"
  53. 520 np=val(np$)
  54. 530 gosub2620
  55. 540 pn=177:r1=45:r2=45:r3=45:r4=45:nn=1
  56. 550 gg$="[159]":printgg$;f$;"[146]" :gosub1760:gosub1960:goto630
  57. 560 nn=nn+1
  58. 570 ifnn=np+1thengoto2430
  59. 580 pn=pn+1
  60. 590 printgg$;"          [146]"
  61. 600 ifnn=2thenprintgg$;gz$;s$
  62. 610 ifnn=3thenprintgg$;gz$;t$
  63. 620 ifnn=4thenprintgg$;gz$;l$
  64. 630 cp=0:iff$="wiz kid"andnn=1thencp=1
  65. 640 ifs$="wonder boy"andnn=2thencp=1
  66. 650 ift$="sassy sue"andnn=3thencp=1
  67. 660 ifl$="micro chip"andnn=4thencp=1
  68. 670 ifl$="micro chip"andnn=4thencp=1
  69. 680 ifcp=1thenprint"[159]rolling":goto700
  70. 690 print"[159]roll dice"
  71. 700 ifcp<>1thenprint"(press r)[146]":goto720
  72. 710 print"  dice   [146]"
  73. 720 gosub750
  74. 730 print"[159]         [146]":print"[159]         [146]"
  75. 740 goto1010
  76. 750 ifcp=1then780
  77. 760 geta$:ifa$=""then760
  78. 770 ifa$<>"r"then760
  79. 780 rem
  80. 790 sp=53248
  81. 800 poke2042,248:poke2043,249:pokesp+41,1:pokesp+42,1:pokesp+28,15
  82. 810 poke2040,248:poke2041,249:pokesp+21,1:pokesp+39,1:pokesp+40,1
  83. 820 s1=5:x=255:sys(29965+155)
  84. 830 x=x-20:pokesp+21,s1
  85. 840 pokesp,x:pokesp+1,172
  86. 850 pokesp+2,x:pokesp+3,172
  87. 860 pokesp+4,x:pokesp+5,200
  88. 870 pokesp+6,x:pokesp+7,200
  89. 880 s1=s1+5
  90. 890 ifs1=15thens1=5
  91. 900 ifx>30then830
  92. 910 s1=5:x=30
  93. 920 x=x+5:pokesp+21,s1
  94. 930 pokesp,x:pokesp+1,172
  95. 940 pokesp+2,x:pokesp+3,172
  96. 950 pokesp+4,x:pokesp+5,200
  97. 960 pokesp+6,x:pokesp+7,200
  98. 970 s1=s1+5
  99. 980 ifs1=15thens1=5
  100. 990 ifx>100thenpoke(29965+1079),4:return
  101. 1000 goto920
  102. 1010 d1=int(6*rnd(0)+1)
  103. 1020 d2=int(6*rnd(0)+1)
  104. 1030 td=d1+249:bd=d2+249
  105. 1040 poke2040,td:poke2041,bd
  106. 1050 pokesp+21,3:pokesp,105:pokesp+1,172
  107. 1060 pokesp+2,105:pokesp+3,200
  108. 1070 b$="":bn=0:bb=0:d3=d1+d2
  109. 1080 dd=d3:printb$;"dice total";dd:ifcp=1then1110
  110. 1090 print"type number(s)[146]"
  111. 1100 print"e=erase d=done[146]"
  112. 1110 ifcp=1andbb=1thenbb=0:d3=dd
  113. 1120 ifcp=1then3080
  114. 1130 getn$:ifn$=""then1110
  115. 1140 ifn$="d"then1520
  116. 1150 if(n$>"9")or(n$<"1")then1130
  117. 1160 n=val(n$):ifz(n)=0thengosub2060:goto1110
  118. 1170 ifn>d3thengosub1980:goto1110
  119. 1180 z(n)=0
  120. 1190 ifn=d3thend3=d3-n:goto1910
  121. 1200 d3=d3-n:ifcp<>1thenprintb$"";n;"[146]"
  122. 1210 ifcp=1andbb=1then1110
  123. 1220 ifcp=1then1240
  124. 1230 getn1$:ifn1$=""then1210
  125. 1240 ifn1$="d"then1520
  126. 1250 ifn1$="e"thenz(n)=n:gosub1750:printb$"        ":goto1110
  127. 1260 n1=val(n1$):ifz(n1)=0thengosub2070:goto1210
  128. 1270 ifn1>d3thengosub1990:goto1210
  129. 1280 z(n1)=0
  130. 1290 ifn1=d3thend3=d3-n1:goto1910
  131. 1300 d3=d3-n1:ifcp<>1thenprintb$"";n1;"[146]"
  132. 1310 ifcp=1andbb=1then1110
  133. 1320 ifcp=1then1340
  134. 1330 getn2$:ifn2$=""then1310
  135. 1340 ifn2$="d"then1520
  136. 1350 ifn2$="e"thenz(n)=n:z(n1)=n1:gosub1750:printb$"       ":goto1110
  137. 1360 n2=val(n2$):ifz(n2)=0thengosub2080:goto1310
  138. 1370 ifn2>d3thengosub2000:goto1310
  139. 1380 z(n2)=0
  140. 1390 ifn2=d3thend3=d3-n2:goto1910
  141. 1400 d3=d3-n2:ifcp<>1thenprintb$"";n2;"[146]"
  142. 1410 ifcp=1andbb=1then1110
  143. 1420 ifcp=1then1440
  144. 1430 getn3$:ifn3$=""then1410
  145. 1440 ifn3$="d"then1520
  146. 1450 ifn3$="e"thenz(n)=n:z(n1)=n1:z(n2)=n2:gosub1750:printb$"         ":goto1110
  147. 1460 n3=val(n3$):ifz(n3)=0thengosub2090:goto1410
  148. 1470 ifn3>d3thengosub2010:goto1410
  149. 1480 ifn3<>d3thenbb=1:goto1410
  150. 1490 z(n3)=0
  151. 1500 ifn3=d3thend3=d3-n3:goto1910
  152. 1510 printb$"              "
  153. 1520 r1$="[159]"
  154. 1530 r2$="[159]"
  155. 1540 ifnn=1thenprintr1$"   [157][157][157]";r1;"[146]"
  156. 1550 ifnn=2thenprintr2$"   [157][157][157]";r2;"[146]"
  157. 1560 ifnn=3thenprintr1$;"   [157][157][157]";r3;"[146]"
  158. 1570 ifnn=4thenprintr2$;"   [157][157][157]";r4;"[146]"
  159. 1580 ifcp=1thenforx=1to1000:next
  160. 1590 printb$;"            "
  161. 1600 printb$;"[157]               "
  162. 1610 print"                    [146]"
  163. 1620 ifn<>0thenv=n:gosub3010
  164. 1630 ifn1<>0thenv=n1:gosub3010
  165. 1640 ifn2<>0thenv=n2:gosub3010
  166. 1650 ifn3<>0thenv=n3:gosub3010
  167. 1660 ifcp=1thenforx=1to1000:next
  168. 1670 printb$;"               "
  169. 1680 ifz(1)+z(2)+z(3)+z(4)+z(5)+z(6)+z(7)+z(8)+z(9)=0thenn$="d":pl=1
  170. 1690 ifpl=1thenprint""tab(20)"pure luck !":pl=0:forx=1to2000:next
  171. 1700 ifn$="d"then1830
  172. 1710 ifn1$="d"then1830
  173. 1720 ifn2$="d"then1830
  174. 1730 ifn3$="d"then1830
  175. 1740 n=0:n1=0:n2=0:n3=0:n$="":n1$="":n2$="":n3$="":goto630
  176. 1750 n=0:n1=0:n2=0:n3=0:n$="":n1$="":n2$="":n3$="":d3=dd:return
  177. 1760 r1$="[159]"
  178. 1770 r2$="[159]"
  179. 1780 ifnp>0thenprintr1$;r1;"[146]"
  180. 1790 ifnp>1thenprintr2$;r2;"[146]"
  181. 1800 ifnp>2thenprintr1$;"";r3;"[146]"
  182. 1810 ifnp>3thenprintr2$;"";r4;"[146]"
  183. 1820 return
  184. 1830 print"[165]  [165]  [165]  [165]  [165]  [165]  [165]  [165]  [165]  [146]"
  185. 1840 print"[165]  [165]  [165]  [165]  [165]  [165]  [165]  [165]  [165]  [146]"
  186. 1850 print"[165]1 [165]2 [165]3 [165]4 [165]5 [165]6 [165]7 [165]8 [165]9 [146]"
  187. 1860 print"[165]  [165]  [165]  [165]  [165]  [165]  [165]  [165]  [165]  [146]"
  188. 1870 print"[165]  [165]  [165]  [165]  [165]  [165]  [165]  [165]  [165]  [146]"
  189. 1880 print"[165]  [165]  [165]  [165]  [165]  [165]  [165]  [165]  [165]  [146]"
  190. 1890 n=0:n1=0:n2=0:n3=0:n$="":n1$="":n2$="":n3$="":gosub1960
  191. 1900 goto560
  192. 1910 ifnn=1thenr1=r1-n:r1=r1-n1:r1=r1-n2:r1=r1-n3
  193. 1920 ifnn=2thenr2=r2-n:r2=r2-n1:r2=r2-n2:r2=r2-n3
  194. 1930 ifnn=3thenr3=r3-n:r3=r3-n1:r3=r3-n2:r3=r3-n3
  195. 1940 ifnn=4thenr4=r4-n:r4=r4-n1:r4=r4-n2:r4=r4-n3
  196. 1950 goto1510
  197. 1960 forzz=1to9:z(zz)=zz:next
  198. 1970 return
  199. 1980 ifcp=1thenprintb$;"[157][157][157][145]    thinking ":goto2030
  200. 1990 ifcp=1thenprintb$;"[157][157][157][145]    thinking ":z(n)=n:goto2030
  201. 2000 ifcp=1thenprintb$;"[157][157][157][145]    thinking ":z(n)=n:z(n1)=n1:goto2030
  202. 2010 ifcp=1thenprintb$;"[157][157][157][145]    thinking ":z(n)=n:z(n1)=n1:z(n2)=n2:goto2030
  203. 2020 printb$;"[157][157][157][145]number too high"
  204. 2030 forx=1to1000:next:bb=1
  205. 2040 printb$;"[157][157][157][145]